package learningThread.syn.synchronizedMethodLockObj.communicate.joinSleep;

/**
 * join的功能在内部使用waite(sss)来实现的，join的方法具有释放锁的功效
 */
public class Test {

    public static void main(String[] args) {
        try {
            MyThread myThread = new MyThread();
            myThread.start();
            //myThread.join(2000);
            myThread.sleep(2000);
            System.out.println("end time"+System.currentTimeMillis());
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
